[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            getdouble - inputs a double from the keyboard

  Syntax              char *getdouble(void);

  Prototype in        keyboard.h

  Remarks             getdouble inputs a double from the keyboard. Only
                      digits, decimal point, leading sign and backspace
                      are valid input. Input is terminated when the ENTER
                      key is pressed. Video output is via Borland's
                      console i/o.

                      The maximum length of input is 25.

  Return value        returns a string of the format     [sn] [ddd] [.]
                      [ddd] where

                           [sn]  = optional sign (+ or -)
                           [ddd] = optional digits
                           [.]   = optional decimal point

  See also            getint(), getreal()

  Example             #include <keyboard.h>
                      #include <stdio.h>
                      main()
                      {
                           char *c;

                           printf("Give me a double: ");
                           c = getdouble();
                           printf("Your input is %s\n",c);
                      }

  Program output      Give me a double: -1289.12003
                      Your input is -1289.12003


See Also: getint() getget() getreal()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson